<template>
  <div>
    <el-table :data="memberArr" style="width: 100%">
      <el-table-column prop="id" label="用户编号"> </el-table-column>
      <el-table-column prop="nickname" label="昵称" width="180">
      </el-table-column>
      <el-table-column prop="phone" label="手机号"> </el-table-column>
      <el-table-column prop="status" label="状态">
        <template slot-scope="obj">
          <el-tag v-show="obj.row.status == 1">启用中</el-tag>
          <el-tag v-show="obj.row.status == 2" type="danger">已禁用</el-tag>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="obj">
          <el-button type="primary" icon="el-icon-edit" circle @click="update(obj.row.uid)"></el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: ["memberArr"],
  methods: {
    update(uid){
      this.$emit('updataMember',uid)
    }
  },
};
</script>

<style>
.cell {
  text-align: center;
}
</style>